-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[clang][AST][NFC] fix spelling typos in clang AST files #141346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-clang Author: Baranov Victor (vbvictor) ChangesFull diff: https://github.com/llvm/llvm-project/pull/141346.diff 7 Files Affected:
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index 1fdc488a76507..fc2f0cbce88ac 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -582,7 +582,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
llvm::DenseMap<UsingEnumDecl *, UsingEnumDecl *>
InstantiatedFromUsingEnumDecl;
- /// Simlarly maps instantiated UsingShadowDecls to their origin.
+ /// Similarly maps instantiated UsingShadowDecls to their origin.
llvm::DenseMap<UsingShadowDecl*, UsingShadowDecl*>
InstantiatedFromUsingShadowDecl;
@@ -790,7 +790,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
}
return new (*this) DeclListNode(ND);
}
- /// Deallcates a \c DeclListNode by returning it to the \c ListNodeFreeList
+ /// Deallocates a \c DeclListNode by returning it to the \c ListNodeFreeList
/// pool.
void DeallocateDeclListNode(DeclListNode *N) {
N->Rest = ListNodeFreeList;
@@ -1123,7 +1123,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// Clean up the merged definition list. Call this if you might have
/// added duplicates into the list.
- void deduplicateMergedDefinitonsFor(NamedDecl *ND);
+ void deduplicateMergedDefinitionsFor(NamedDecl *ND);
/// Get the additional modules in which the definition \p Def has
/// been merged.
@@ -2565,7 +2565,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// Return the ABI-specified natural alignment of a (complete) type \p T,
/// before alignment adjustments, in bits.
///
- /// This alignment is curently used only by ARM and AArch64 when passing
+ /// This alignment is currently used only by ARM and AArch64 when passing
/// arguments of a composite type.
unsigned getTypeUnadjustedAlign(QualType T) const {
return getTypeUnadjustedAlign(T.getTypePtr());
@@ -2638,7 +2638,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// considered specifically for the query.
CharUnits getAlignOfGlobalVarInChars(QualType T, const VarDecl *VD) const;
- /// Return the minimum alignement as specified by the target. If \p VD is
+ /// Return the minimum alignment as specified by the target. If \p VD is
/// non-null it may be used to identify external or weak variables.
unsigned getMinGlobalAlignOfVar(uint64_t Size, const VarDecl *VD) const;
diff --git a/clang/include/clang/AST/ASTImporterLookupTable.h b/clang/include/clang/AST/ASTImporterLookupTable.h
index 2dbc44c5dcd44..54b8c417b9927 100644
--- a/clang/include/clang/AST/ASTImporterLookupTable.h
+++ b/clang/include/clang/AST/ASTImporterLookupTable.h
@@ -34,7 +34,7 @@ class DeclContext;
// Example 2:
// // The fwd decl to Foo is not found in the lookupPtr of the DC of the
// // translation unit decl.
-// // Here we could find the node by doing a traverse throught the list of
+// // Here we could find the node by doing a traverse through the list of
// // the Decls in the DC, but that would not scale.
// struct A { struct Foo *p; };
// This is a severe problem because the importer decides if it has to create a
diff --git a/clang/include/clang/AST/AbstractBasicReader.h b/clang/include/clang/AST/AbstractBasicReader.h
index 5ab438715ecf7..586ad3be62a7e 100644
--- a/clang/include/clang/AST/AbstractBasicReader.h
+++ b/clang/include/clang/AST/AbstractBasicReader.h
@@ -1,4 +1,4 @@
-//==--- AbstractBasiceReader.h - Abstract basic value deserialization -----===//
+//==--- AbstractBasicReader.h - Abstract basic value deserialization -----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index b5417fcf20ddd..b56a64e07f110 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1085,7 +1085,7 @@ void ASTContext::mergeDefinitionIntoModule(NamedDecl *ND, Module *M,
MergedDefModules[cast<NamedDecl>(ND->getCanonicalDecl())].push_back(M);
}
-void ASTContext::deduplicateMergedDefinitonsFor(NamedDecl *ND) {
+void ASTContext::deduplicateMergedDefinitionsFor(NamedDecl *ND) {
auto It = MergedDefModules.find(cast<NamedDecl>(ND->getCanonicalDecl()));
if (It == MergedDefModules.end())
return;
@@ -1803,7 +1803,7 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const {
Align = Target->getCharWidth();
}
- // Ensure miminum alignment for global variables.
+ // Ensure minimum alignment for global variables.
if (const auto *VD = dyn_cast<VarDecl>(D))
if (VD->hasGlobalStorage() && !ForAlignof) {
uint64_t TypeSize =
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp
index b481ad5df667e..14f750293b5ff 100644
--- a/clang/lib/AST/ASTImporter.cpp
+++ b/clang/lib/AST/ASTImporter.cpp
@@ -2183,7 +2183,7 @@ Error ASTNodeImporter::ImportFieldDeclDefinition(const FieldDecl *From,
QualType FromType = From->getType();
QualType ToType = To->getType();
if (FromType->isArrayType()) {
- // getBaseElementTypeUnsafe(...) handles multi-dimensonal arrays for us.
+ // getBaseElementTypeUnsafe(...) handles multi-dimensional arrays for us.
FromRecordDecl = FromType->getBaseElementTypeUnsafe()->getAsRecordDecl();
ToRecordDecl = ToType->getBaseElementTypeUnsafe()->getAsRecordDecl();
}
@@ -6105,7 +6105,7 @@ ExpectedDecl ASTNodeImporter::VisitClassTemplateDecl(ClassTemplateDecl *D) {
if (!hasSameVisibilityContextAndLinkage(FoundTemplate, D))
continue;
- // FIXME: sufficient conditon for 'IgnoreTemplateParmDepth'?
+ // FIXME: sufficient condition for 'IgnoreTemplateParmDepth'?
bool IgnoreTemplateParmDepth =
(FoundTemplate->getFriendObjectKind() != Decl::FOK_None) !=
(D->getFriendObjectKind() != Decl::FOK_None);
diff --git a/clang/lib/AST/ASTStructuralEquivalence.cpp b/clang/lib/AST/ASTStructuralEquivalence.cpp
index 499854a75abc6..d371c4ac4bb9a 100644
--- a/clang/lib/AST/ASTStructuralEquivalence.cpp
+++ b/clang/lib/AST/ASTStructuralEquivalence.cpp
@@ -458,7 +458,7 @@ CheckStructurallyEquivalentAttributes(StructuralEquivalenceContext &Context,
// If either declaration has an attribute on it, we treat the declarations
// as not being structurally equivalent.
// FIXME: this should be handled on a case-by-case basis via tablegen in
- // Attr.td. There are multiple cases to consider: one declation with the
+ // Attr.td. There are multiple cases to consider: one declaration with the
// attribute, another without it; different attribute syntax|spellings for
// the same semantic attribute, differences in attribute arguments, order
// in which attributes are applied, how to merge attributes if the types are
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index c113fd7cbb911..82d377581318d 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -10531,7 +10531,7 @@ void ASTReader::finishPendingActions() {
// Do some cleanup.
for (auto *ND : PendingMergedDefinitionsToDeduplicate)
- getContext().deduplicateMergedDefinitonsFor(ND);
+ getContext().deduplicateMergedDefinitionsFor(ND);
PendingMergedDefinitionsToDeduplicate.clear();
// For each decl chain that we wanted to complete while deserializing, mark
|
@llvm/pr-subscribers-clang-modules Author: Baranov Victor (vbvictor) ChangesFull diff: https://github.com/llvm/llvm-project/pull/141346.diff 7 Files Affected:
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index 1fdc488a76507..fc2f0cbce88ac 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -582,7 +582,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
llvm::DenseMap<UsingEnumDecl *, UsingEnumDecl *>
InstantiatedFromUsingEnumDecl;
- /// Simlarly maps instantiated UsingShadowDecls to their origin.
+ /// Similarly maps instantiated UsingShadowDecls to their origin.
llvm::DenseMap<UsingShadowDecl*, UsingShadowDecl*>
InstantiatedFromUsingShadowDecl;
@@ -790,7 +790,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
}
return new (*this) DeclListNode(ND);
}
- /// Deallcates a \c DeclListNode by returning it to the \c ListNodeFreeList
+ /// Deallocates a \c DeclListNode by returning it to the \c ListNodeFreeList
/// pool.
void DeallocateDeclListNode(DeclListNode *N) {
N->Rest = ListNodeFreeList;
@@ -1123,7 +1123,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// Clean up the merged definition list. Call this if you might have
/// added duplicates into the list.
- void deduplicateMergedDefinitonsFor(NamedDecl *ND);
+ void deduplicateMergedDefinitionsFor(NamedDecl *ND);
/// Get the additional modules in which the definition \p Def has
/// been merged.
@@ -2565,7 +2565,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// Return the ABI-specified natural alignment of a (complete) type \p T,
/// before alignment adjustments, in bits.
///
- /// This alignment is curently used only by ARM and AArch64 when passing
+ /// This alignment is currently used only by ARM and AArch64 when passing
/// arguments of a composite type.
unsigned getTypeUnadjustedAlign(QualType T) const {
return getTypeUnadjustedAlign(T.getTypePtr());
@@ -2638,7 +2638,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// considered specifically for the query.
CharUnits getAlignOfGlobalVarInChars(QualType T, const VarDecl *VD) const;
- /// Return the minimum alignement as specified by the target. If \p VD is
+ /// Return the minimum alignment as specified by the target. If \p VD is
/// non-null it may be used to identify external or weak variables.
unsigned getMinGlobalAlignOfVar(uint64_t Size, const VarDecl *VD) const;
diff --git a/clang/include/clang/AST/ASTImporterLookupTable.h b/clang/include/clang/AST/ASTImporterLookupTable.h
index 2dbc44c5dcd44..54b8c417b9927 100644
--- a/clang/include/clang/AST/ASTImporterLookupTable.h
+++ b/clang/include/clang/AST/ASTImporterLookupTable.h
@@ -34,7 +34,7 @@ class DeclContext;
// Example 2:
// // The fwd decl to Foo is not found in the lookupPtr of the DC of the
// // translation unit decl.
-// // Here we could find the node by doing a traverse throught the list of
+// // Here we could find the node by doing a traverse through the list of
// // the Decls in the DC, but that would not scale.
// struct A { struct Foo *p; };
// This is a severe problem because the importer decides if it has to create a
diff --git a/clang/include/clang/AST/AbstractBasicReader.h b/clang/include/clang/AST/AbstractBasicReader.h
index 5ab438715ecf7..586ad3be62a7e 100644
--- a/clang/include/clang/AST/AbstractBasicReader.h
+++ b/clang/include/clang/AST/AbstractBasicReader.h
@@ -1,4 +1,4 @@
-//==--- AbstractBasiceReader.h - Abstract basic value deserialization -----===//
+//==--- AbstractBasicReader.h - Abstract basic value deserialization -----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index b5417fcf20ddd..b56a64e07f110 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1085,7 +1085,7 @@ void ASTContext::mergeDefinitionIntoModule(NamedDecl *ND, Module *M,
MergedDefModules[cast<NamedDecl>(ND->getCanonicalDecl())].push_back(M);
}
-void ASTContext::deduplicateMergedDefinitonsFor(NamedDecl *ND) {
+void ASTContext::deduplicateMergedDefinitionsFor(NamedDecl *ND) {
auto It = MergedDefModules.find(cast<NamedDecl>(ND->getCanonicalDecl()));
if (It == MergedDefModules.end())
return;
@@ -1803,7 +1803,7 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const {
Align = Target->getCharWidth();
}
- // Ensure miminum alignment for global variables.
+ // Ensure minimum alignment for global variables.
if (const auto *VD = dyn_cast<VarDecl>(D))
if (VD->hasGlobalStorage() && !ForAlignof) {
uint64_t TypeSize =
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp
index b481ad5df667e..14f750293b5ff 100644
--- a/clang/lib/AST/ASTImporter.cpp
+++ b/clang/lib/AST/ASTImporter.cpp
@@ -2183,7 +2183,7 @@ Error ASTNodeImporter::ImportFieldDeclDefinition(const FieldDecl *From,
QualType FromType = From->getType();
QualType ToType = To->getType();
if (FromType->isArrayType()) {
- // getBaseElementTypeUnsafe(...) handles multi-dimensonal arrays for us.
+ // getBaseElementTypeUnsafe(...) handles multi-dimensional arrays for us.
FromRecordDecl = FromType->getBaseElementTypeUnsafe()->getAsRecordDecl();
ToRecordDecl = ToType->getBaseElementTypeUnsafe()->getAsRecordDecl();
}
@@ -6105,7 +6105,7 @@ ExpectedDecl ASTNodeImporter::VisitClassTemplateDecl(ClassTemplateDecl *D) {
if (!hasSameVisibilityContextAndLinkage(FoundTemplate, D))
continue;
- // FIXME: sufficient conditon for 'IgnoreTemplateParmDepth'?
+ // FIXME: sufficient condition for 'IgnoreTemplateParmDepth'?
bool IgnoreTemplateParmDepth =
(FoundTemplate->getFriendObjectKind() != Decl::FOK_None) !=
(D->getFriendObjectKind() != Decl::FOK_None);
diff --git a/clang/lib/AST/ASTStructuralEquivalence.cpp b/clang/lib/AST/ASTStructuralEquivalence.cpp
index 499854a75abc6..d371c4ac4bb9a 100644
--- a/clang/lib/AST/ASTStructuralEquivalence.cpp
+++ b/clang/lib/AST/ASTStructuralEquivalence.cpp
@@ -458,7 +458,7 @@ CheckStructurallyEquivalentAttributes(StructuralEquivalenceContext &Context,
// If either declaration has an attribute on it, we treat the declarations
// as not being structurally equivalent.
// FIXME: this should be handled on a case-by-case basis via tablegen in
- // Attr.td. There are multiple cases to consider: one declation with the
+ // Attr.td. There are multiple cases to consider: one declaration with the
// attribute, another without it; different attribute syntax|spellings for
// the same semantic attribute, differences in attribute arguments, order
// in which attributes are applied, how to merge attributes if the types are
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index c113fd7cbb911..82d377581318d 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -10531,7 +10531,7 @@ void ASTReader::finishPendingActions() {
// Do some cleanup.
for (auto *ND : PendingMergedDefinitionsToDeduplicate)
- getContext().deduplicateMergedDefinitonsFor(ND);
+ getContext().deduplicateMergedDefinitionsFor(ND);
PendingMergedDefinitionsToDeduplicate.clear();
// For each decl chain that we wanted to complete while deserializing, mark
|
cor3ntin
approved these changes
May 24, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
clang:modules
C++20 modules and Clang Header Modules
clang
Clang issues not falling into any other category
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.